﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace InSys.Documents
{
    public partial class FormPostList : Form
    {
        private MapTestLinqDataContext db = new MapTestLinqDataContext(Properties.Settings.Default.testlinqConnectionString);
        public FormPostList()
        {
            InitializeComponent();
            var query = from item in db.posts select item;
            postBindingSource.DataSource = query;
        }



        private void buttonSave_Click(object sender, EventArgs e)
        {
            try
            {
                db.SubmitChanges();
                this.Text = "Список должностей";
            }
            catch (Exception)
            {
            }
        }
    }
}
